/*
 * @Description: promise进阶
 * @Author: Zhanghan
 * @Date: 2025-03-19 13:47:34
 * @LastEditTime: 2025-03-24 09:49:04
 * @LastEditors: Zhanghan
 */
import { useState } from "react";
import { Button } from "antd";
import { Tabs } from "antd";
import type { TabsProps } from "antd";
import All from "./components/All";
import AllSettled from "./components/AllSettled";
function Upgrade() {
  const onChange = (key: string) => {
    console.log(key);
  };
  const items: TabsProps["items"] = [
    {
      key: "1",
      label: "all",
      children: <All />,
    },
    {
      key: "2",
      label: "allSettled",
      children: <AllSettled />,
    },
    {
      key: "3",
      label: "any",
      children: "Content of Tab Pane 3",
    },
  ];
  return (
    <>
      <div className="mb-2 text-center font-bold text-1.5xl">进阶</div>
      <div>
        <Tabs defaultActiveKey="1" items={items} onChange={onChange} />
      </div>
    </>
  );
}

export default Upgrade;
